@echo off
chcp 65001 >nul
title Minecraft 1.16 启动器

:: 检查Python是否存在
set PYTHON_CMD=
if exist "%SystemRoot%\System32\python.exe" set PYTHON_CMD=%SystemRoot%\System32\python.exe
if exist "%SystemRoot%\SysWOW64\python.exe" set PYTHON_CMD=%SystemRoot%\SysWOW64\python.exe
if exist "%USERPROFILE%\AppData\Local\Programs\Python\Python39\python.exe" set PYTHON_CMD=%USERPROFILE%\AppData\Local\Programs\Python\Python39\python.exe
if exist "%USERPROFILE%\AppData\Local\Programs\Python\Python38\python.exe" set PYTHON_CMD=%USERPROFILE%\AppData\Local\Programs\Python\Python38\python.exe
if exist "%USERPROFILE%\AppData\Local\Programs\Python\Python37\python.exe" set PYTHON_CMD=%USERPROFILE%\AppData\Local\Programs\Python\Python37\python.exe

if not defined PYTHON_CMD (
    echo 未找到Python，请先安装Python 3.7或更高版本。
    pause
    exit /b 1
)

echo 正在启动Minecraft 1.16启动器...
"%PYTHON_CMD%" launcher.py

pause